import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
    // mode: 'history',
    routes: [
        {
            path: '/',
            name: 'Home',
            redirect: '/login',
            // component: resolve => require(['@/components/home/home'], resolve),
        },
        // {
        //     path: '/home',
        //     name: 'Home',
        //     component: resolve => require(['@/components/home/home'], resolve)
        // },
        // {
        //     path: '/room/:id',
        //     name: 'Room',
        //     component: resolve => require(['@/components/room/room'], resolve)
        // },
        // {
        //     path: '/gameList',
        //     name: 'gameList',
        //     component: resolve => require(['@/components/home/gameList'], resolve)
        // },
        // {
        //     path: '/leaderBoard',
        //     name: 'leaderBoard',
        //     component: resolve => require(['@/components/room/chatRoom/leaderBoard/leaderBoard'], resolve)
        // },
        // {
        //     path: '/lotteryReusult',
        //     name: 'lotteryReusult',
        //     component: resolve => require(['@/components/room/lotteryReusult/lotteryReusult'], resolve)
        // },
        // {
        //     path: '/taskCenter',
        //     name: 'taskCenter',
        //     component: resolve => require(['@/components/personalCenter/taskCenter/taskCenter'], resolve),
        // },
        {
            path: '/personalCenter',
            name: 'PersonalCenter',
            component: resolve => require(['@/components/personalCenter/PersonalCenter'], resolve),
            redirect: '/personalCenter/vipReport',
            children: [{
                    path: 'personalInfo',
                    name: 'PersonalInfo',
                    component: resolve => require(['@/components/personalCenter/personalInfo/personalInfo'], resolve),
                }, {
                    path: 'securitySetting',
                    name: 'CecuritySetting',
                    component: resolve => require(['@/components/personalCenter/securitySetting/securitySetting'], resolve),
                }, {
                    path: 'cardManager',
                    name: 'CardManager',
                    component: resolve => require(['@/components/personalCenter/cardManager/cardManager'], resolve),
                },
                {
                    path: 'gameRecord',
                    name: 'gameRecord',
                    component: resolve => require(['@/components/personalCenter/betRecord/gameRecord'], resolve),
                },
                {
                    path: 'betRecord',
                    name: 'TetRecord',
                    component: resolve => require(['@/components/personalCenter/betRecord/betRecord'], resolve),
                },
                {
                    path: 'dealDetail',
                    name: 'DealDetail',
                    component: resolve => require(['@/components/personalCenter/dealDetail/dealDetail'], resolve),
                },
                // 代理分享
                {
                    path: 'agencyRole',
                    name: 'AgencyRole',
                    component: resolve => require(['@/components/personalCenter/agencyShare/agencyRole'], resolve),
                },
                {
                    path: 'agencyShare',
                    name: 'AgencyShare',
                    component: resolve => require(['@/components/personalCenter/agencyShare/agencyShare'], resolve),
                },
                //团队管理
                {
                    path: 'self',
                    name: 'Self',
                    component: resolve => require(['@/components/personalCenter/teamManager/self'], resolve),
                },
                { //代理报表
                    path: 'agency',
                    name: 'agency',
                    component: resolve => require(['@/components/personalCenter/teamManager/agency'], resolve),
                },
                {
                    path: 'teamReport',
                    name: 'TeamReport',
                    component: resolve => require(['@/components/personalCenter/teamManager/teamReport'], resolve),
                },
                {
                    path: 'underAccount',
                    name: 'UnderAccount',
                    component: resolve => require(['@/components/personalCenter/teamManager/underAccount'], resolve),
                },
                {
                    path: 'vipReport',
                    name: 'VipReport',
                    component: resolve => require(['@/components/personalCenter/teamManager/vipReport'], resolve),
                },
                {
                    path: 'orderList',
                    name: 'OrderList',
                    component: resolve => require(['@/components/personalCenter/teamManager/orderList'], resolve),
                },
                {
                    path: 'announcement',
                    name: 'Announcement',
                    component: resolve => require(['@/components/personalCenter/announcement/announcement'], resolve),
                },
                {
                    path: 'myFollow',
                    name: 'myFollow',
                    component: resolve => require(['@/components/personalCenter/myFollow/myFollow'], resolve),
                },
            ]
        },
        // {//VIP等级制度
        //     path: '/PersonalCenter/vipLevel',
        //     name: 'VipLevel',
        //     component: resolve => require(['@/components/personalCenter/vipLevel/vipLevel'], resolve),
        // },
        // {//玩法介绍
        //     path: '/article/howToPlay',
        //     name: 'HowToPlay',
        //     component: resolve => require(['@/components/article/howToPlay'], resolve),
        // },
        // {//关于我们
        //     path: '/article/page',
        //     name: 'Page',
        //     component: resolve => require(['@/components/article/page'], resolve),
        // },
        // {//天天返利
        //     path: '/article/rebate',
        //     name: 'Rebate',
        //     component: resolve => require(['@/components/article/rebate'], resolve),
        // },
        {//登录
            path: '/login',
            name: 'Login',
            component: resolve => require(['@/components/login/login'], resolve),
        },
        // {//注册
        //     path: '/reg',
        //     name: 'Reg',
        //     component: resolve => require(['@/components/reg/reg'], resolve),
        // },
        // {//活动中心
        //     path: '/activityCenter',
        //     name: 'ActivityCenter',
        //     component: resolve => require(['@/components/activityCenter/activityCenter'], resolve),
        // },
        // {//手机APP
        //     path: '/downLoad',
        //     name: 'DownLoad',
        //     component: resolve => require(['@/components/downLoad/downLoad'], resolve),
        // }
    ]
})



// WEBPACK FOOTER //
// ./src/router/index.js